package com.sebscape.sebcms.security.services;

import java.util.Random;

public class PasswordGenerator {
	private static char[] specialChars = new char[]{'!','@','#','$','%','^','&','*'};
	private static String[] words = new String[]{
			"puppy","kitten","chair","couch","friend","willow","register",
			"sunny","hook","hollow","pair","apple","pool","wash","tester","great",
			"desk","father","tree","fence","shovel","hammer","chain","trail"
	}; // TODO: Add words to this list.

	public static String generatePassword(){
		Random r = new Random();
		String firstWord =  words[ r.nextInt(words.length) ];
		String secondWord = null;
		while( !secondWord.equals(firstWord)){
			secondWord = words[ r.nextInt(words.length) ];
		}
		return firstWord + specialChars[ r.nextInt(specialChars.length) ] + secondWord;
	}
	
}
